﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;
using System.Data.SqlClient;

public class tbAssessmentDB
{
    #region[tbAssessment_Add]
    public static bool tbAssessment_Add(tbAssessmentDATA _tbAssessmentDATA)
    {
        bool check = false;
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_Add", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbConn.Open();
                dbCmd.Parameters.Add(new SqlParameter("@assDateBegin", _tbAssessmentDATA.assDateBegin));
                dbCmd.Parameters.Add(new SqlParameter("@assDateEnd", _tbAssessmentDATA.assDateEnd));
                dbCmd.Parameters.Add(new SqlParameter("@assPoint", _tbAssessmentDATA.assPoint));
                dbCmd.Parameters.Add(new SqlParameter("@assPointLD", _tbAssessmentDATA.assPointLD));
                dbCmd.Parameters.Add(new SqlParameter("@assPointLD_1", _tbAssessmentDATA.assPointLD_1));
                dbCmd.Parameters.Add(new SqlParameter("@assTotalpoint", _tbAssessmentDATA.assTotalpoint));
                dbCmd.Parameters.Add(new SqlParameter("@uID", _tbAssessmentDATA.uID));
                dbCmd.Parameters.Add(new SqlParameter("@uIDLD", _tbAssessmentDATA.uIDLD));
                dbCmd.Parameters.Add(new SqlParameter("@uIDLD_1", _tbAssessmentDATA.uIDLD_1));
                dbCmd.ExecuteNonQuery();
                dbConn.Close();
                check = true;
            }
        }
        return check;
    }
    #endregion
    #region[tbAssessment_Update]
    public static bool tbAssessment_Update(tbAssessmentDATA _tbAssessmentDATA)
    {
        bool check = false;
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_Update", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbConn.Open();
                dbCmd.Parameters.Add(new SqlParameter("@assId", _tbAssessmentDATA.assId));
                dbCmd.Parameters.Add(new SqlParameter("@assDateBegin", _tbAssessmentDATA.assDateBegin));
                dbCmd.Parameters.Add(new SqlParameter("@assDateEnd", _tbAssessmentDATA.assDateEnd));
                dbCmd.Parameters.Add(new SqlParameter("@assPoint", _tbAssessmentDATA.assPoint));
                dbCmd.Parameters.Add(new SqlParameter("@assPointLD", _tbAssessmentDATA.assPointLD));
                dbCmd.Parameters.Add(new SqlParameter("@assPointLD_1", _tbAssessmentDATA.assPointLD_1));
                dbCmd.Parameters.Add(new SqlParameter("@assTotalpoint", _tbAssessmentDATA.assTotalpoint));
                dbCmd.Parameters.Add(new SqlParameter("@uID", _tbAssessmentDATA.uID));
                dbCmd.Parameters.Add(new SqlParameter("@uIDLD", _tbAssessmentDATA.uIDLD));
                dbCmd.Parameters.Add(new SqlParameter("@uIDLD_1", _tbAssessmentDATA.uIDLD_1));
                dbCmd.ExecuteNonQuery();
                dbConn.Close();
                check = true;
            }
        }
        return check;
    }
    #endregion
    #region[tbAssessment_Update_UserID]
    public static bool tbAssessment_Update_UserID(tbAssessmentDATA _tbAssessmentDATA)
    {
        bool check = false;
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_Update_UserID", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbConn.Open();
                dbCmd.Parameters.Add(new SqlParameter("@assId", _tbAssessmentDATA.assId));
                dbCmd.Parameters.Add(new SqlParameter("@uID", _tbAssessmentDATA.uID));
                dbCmd.Parameters.Add(new SqlParameter("@uIDLD", _tbAssessmentDATA.uIDLD));
                dbCmd.Parameters.Add(new SqlParameter("@uIDLD_1", _tbAssessmentDATA.uIDLD_1));
                dbCmd.ExecuteNonQuery();
                dbConn.Close();
                check = true;
            }
        }
        return check;
    }
    #endregion
    #region[tbAssessment_Delete]
    public static bool tbAssessment_Delete(string assId)
    {
        bool check = false;
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_Delete", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbCmd.Parameters.Add(new SqlParameter("@assId", assId));
                dbConn.Open();
                dbCmd.ExecuteNonQuery();
                dbConn.Close();
                check = true;
            }
        }
        return check;
    }
    #endregion
    #region[tbAssessment_GetByMax]
    public static List<tbAssessmentDATA> tbAssessment_GetByMax()
    {
        List<tbAssessmentDATA> list = new List<tbAssessmentDATA>();
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_GetByMax", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbConn.Open();
                using (SqlDataReader reader = dbCmd.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        tbAssessmentDATA objtbAssessmentDATA = new tbAssessmentDATA(
                        reader["assId"].ToString(),
                        reader["assDateBegin"].ToString(),
                        reader["assDateEnd"].ToString(),
                        reader["assDate"].ToString(),
                        reader["assPoint"].ToString(),
                        reader["assPointLD"].ToString(),
                        reader["assPointLD_1"].ToString(),
                        reader["assTotalpoint"].ToString(),
                        reader["uID"].ToString(),
                        reader["uIDLD"].ToString(),
                        reader["uIDLD_1"].ToString());
                        list.Add(objtbAssessmentDATA);
                    }
                }
                dbConn.Close();
            }
        }
        return list;
    }
    #endregion
    #region[tbAssessment_GetByCheckuID]
    public static List<tbAssessmentDATA> tbAssessment_GetByCheckuID(string uID)
    {
        List<tbAssessmentDATA> list = new List<tbAssessmentDATA>();
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_GetByCheckuID", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbConn.Open();
                dbCmd.Parameters.Add(new SqlParameter("@uID", uID));
                using (SqlDataReader reader = dbCmd.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        tbAssessmentDATA objtbAssessmentDATA = new tbAssessmentDATA(
                        reader["assId"].ToString(),
                        reader["assDateBegin"].ToString(),
                        reader["assDateEnd"].ToString(),
                        reader["assDate"].ToString(),
                        reader["assPoint"].ToString(),
                        reader["assPointLD"].ToString(),
                        reader["assPointLD_1"].ToString(),
                        reader["assTotalpoint"].ToString(),
                        reader["uID"].ToString(),
                        reader["uIDLD"].ToString(),
                        reader["uIDLD_1"].ToString());
                        list.Add(objtbAssessmentDATA);
                    }
                }
                dbConn.Close();
            }
        }
        return list;
    }
    #endregion
    #region[tbAssessment_GetByID]
    public static List<tbAssessmentDATA> tbAssessment_GetByID(string assId)
    {
        List<tbAssessmentDATA> list = new List<tbAssessmentDATA>();
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_GetByID", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbConn.Open();
                dbCmd.Parameters.Add(new SqlParameter("@assId", assId));
                using (SqlDataReader reader = dbCmd.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        tbAssessmentDATA objtbAssessmentDATA = new tbAssessmentDATA(
                        reader["assId"].ToString(),
                        reader["assDateBegin"].ToString(),
                        reader["assDateEnd"].ToString(),
                        reader["assDate"].ToString(),
                        reader["assPoint"].ToString(),
                        reader["assPointLD"].ToString(),
                        reader["assPointLD_1"].ToString(),
                        reader["assTotalpoint"].ToString(),
                        reader["uID"].ToString(),
                        reader["uIDLD"].ToString(),
                        reader["uIDLD_1"].ToString(),
                        reader["Nhanvien"].ToString(),
                        reader["Lanhdao"].ToString());
                        list.Add(objtbAssessmentDATA);
                    }
                }
                dbConn.Close();
            }
        }
        return list;
    }
    #endregion
    #region[tbAssessment_GetByuID]
    public static List<tbAssessmentDATA> tbAssessment_GetByuID(string uID)
    {
        List<tbAssessmentDATA> list = new List<tbAssessmentDATA>();
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_GetByuID", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbConn.Open();
                dbCmd.Parameters.Add(new SqlParameter("@uID", uID));
                using (SqlDataReader reader = dbCmd.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        tbAssessmentDATA objtbAssessmentDATA = new tbAssessmentDATA(
                        reader["assId"].ToString(),
                        reader["assDateBegin"].ToString(),
                        reader["assDateEnd"].ToString(),
                        reader["assDate"].ToString(),
                        reader["assPoint"].ToString(),
                        reader["assPointLD"].ToString(),
                        reader["assPointLD_1"].ToString(),
                        reader["assTotalpoint"].ToString(),
                        reader["uID"].ToString(),
                        reader["uIDLD"].ToString(),
                        reader["uIDLD_1"].ToString(),
                        reader["Nhanvien"].ToString(),
                        reader["Lanhdao"].ToString());
                        list.Add(objtbAssessmentDATA);
                    }
                }
                dbConn.Close();
            }
        }
        return list;
    }
    #endregion
    #region[tbAssessment_GetByuID_DaDanhGia]
    public static List<tbAssessmentDATA> tbAssessment_GetByuID_DaDanhGia(string uID)
    {
        List<tbAssessmentDATA> list = new List<tbAssessmentDATA>();
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_GetByuID_DaDanhGia", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbConn.Open();
                dbCmd.Parameters.Add(new SqlParameter("@uID", uID));
                using (SqlDataReader reader = dbCmd.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        tbAssessmentDATA objtbAssessmentDATA = new tbAssessmentDATA(
                        reader["assId"].ToString(),
                        reader["assDateBegin"].ToString(),
                        reader["assDateEnd"].ToString(),
                        reader["assDate"].ToString(),
                        reader["assPoint"].ToString(),
                        reader["assPointLD"].ToString(),
                        reader["assPointLD_1"].ToString(),
                        reader["assTotalpoint"].ToString(),
                        reader["uID"].ToString(),
                        reader["uIDLD"].ToString(),
                        reader["uIDLD_1"].ToString());
                        list.Add(objtbAssessmentDATA);
                    }
                }
                dbConn.Close();
            }
        }
        return list;
    }
    #endregion
    #region[tbAssessment_GetByuID_DaDanhGiaCaNhan]
    public static List<tbAssessmentDATA> tbAssessment_GetByuID_DaDanhGiaCaNhan(string uID)
    {
        List<tbAssessmentDATA> list = new List<tbAssessmentDATA>();
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_GetByuID_DaDanhGiaCaNhan", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbConn.Open();
                dbCmd.Parameters.Add(new SqlParameter("@uID", uID));
                using (SqlDataReader reader = dbCmd.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        tbAssessmentDATA objtbAssessmentDATA = new tbAssessmentDATA(
                        reader["assId"].ToString(),
                        reader["assDateBegin"].ToString(),
                        reader["assDateEnd"].ToString(),
                        reader["assDate"].ToString(),
                        reader["assPoint"].ToString(),
                        reader["assPointLD"].ToString(),
                        reader["assPointLD_1"].ToString(),
                        reader["assTotalpoint"].ToString(),
                        reader["uID"].ToString(),
                        reader["uIDLD"].ToString(),
                        reader["uIDLD_1"].ToString());
                        list.Add(objtbAssessmentDATA);
                    }
                }
                dbConn.Close();
            }
        }
        return list;
    }
    #endregion
    #region[tbAssessment_GetByuIDLD]
    public static List<tbAssessmentDATA> tbAssessment_GetByuIDLD(string uIDLD)
    {
        List<tbAssessmentDATA> list = new List<tbAssessmentDATA>();
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_GetByuIDLD", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbConn.Open();
                dbCmd.Parameters.Add(new SqlParameter("@uIDLD", uIDLD));
                using (SqlDataReader reader = dbCmd.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        tbAssessmentDATA objtbAssessmentDATA = new tbAssessmentDATA(
                        reader["assId"].ToString(),
                        reader["assDateBegin"].ToString(),
                        reader["assDateEnd"].ToString(),
                        reader["assDate"].ToString(),
                        reader["assPoint"].ToString(),
                        reader["assPointLD"].ToString(),
                        reader["assPointLD_1"].ToString(),
                        reader["assTotalpoint"].ToString(),
                        reader["uID"].ToString(),
                        reader["uIDLD"].ToString(),
                        reader["uIDLD_1"].ToString(),
                        reader["Nhanvien"].ToString(),
                        reader["Lanhdao"].ToString());
                        list.Add(objtbAssessmentDATA);
                    }
                }
                dbConn.Close();
            }
        }
        return list;
    }
    #endregion
    #region[tbAssessment_GetByCN]
    public static List<tbAssessmentDATA> tbAssessment_GetByCN(string uIDLD)
    {
        List<tbAssessmentDATA> list = new List<tbAssessmentDATA>();
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_GetByCN", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbConn.Open();
                dbCmd.Parameters.Add(new SqlParameter("@uIDLD", uIDLD));
                using (SqlDataReader reader = dbCmd.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        tbAssessmentDATA objtbAssessmentDATA = new tbAssessmentDATA(
                        reader["assId"].ToString(),
                        reader["assDateBegin"].ToString(),
                        reader["assDateEnd"].ToString(),
                        reader["assDate"].ToString(),
                        reader["assPoint"].ToString(),
                        reader["assPointLD"].ToString(),
                        reader["assPointLD_1"].ToString(),
                        reader["assTotalpoint"].ToString(),
                        reader["uID"].ToString(),
                        reader["uIDLD"].ToString(),
                        reader["uIDLD_1"].ToString(),
                        reader["Nhanvien"].ToString(),
                        reader["Lanhdao"].ToString());
                        list.Add(objtbAssessmentDATA);
                    }
                }
                dbConn.Close();
            }
        }
        return list;
    }
    #endregion
    #region[tbAssessment_GetByAdmin]
    public static List<tbAssessmentDATA> tbAssessment_GetByAdmin()
    {
        List<tbAssessmentDATA> list = new List<tbAssessmentDATA>();
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_GetByAdmin", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbConn.Open();
                using (SqlDataReader reader = dbCmd.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        tbAssessmentDATA objtbAssessmentDATA = new tbAssessmentDATA(
                        reader["assId"].ToString(),
                        reader["assDateBegin"].ToString(),
                        reader["assDateEnd"].ToString(),
                        reader["assDate"].ToString(),
                        reader["assPoint"].ToString(),
                        reader["assPointLD"].ToString(),
                        reader["assPointLD_1"].ToString(),
                        reader["assTotalpoint"].ToString(),
                        reader["uID"].ToString(),
                        reader["uIDLD"].ToString(),
                        reader["uIDLD_1"].ToString(),
                        reader["Nhanvien"].ToString(),
                        reader["Lanhdao"].ToString());
                        list.Add(objtbAssessmentDATA);
                    }
                }
                dbConn.Close();
            }
        }
        return list;
    }
    #endregion
    #region[tbAssessment_GetByAdmin_CN]
    public static List<tbAssessmentDATA> tbAssessment_GetByAdmin_CN()
    {
        List<tbAssessmentDATA> list = new List<tbAssessmentDATA>();
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_GetByAdmin_CN", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbConn.Open();
                using (SqlDataReader reader = dbCmd.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        tbAssessmentDATA objtbAssessmentDATA = new tbAssessmentDATA(
                        reader["assId"].ToString(),
                        reader["assDateBegin"].ToString(),
                        reader["assDateEnd"].ToString(),
                        reader["assDate"].ToString(),
                        reader["assPoint"].ToString(),
                        reader["assPointLD"].ToString(),
                        reader["assPointLD_1"].ToString(),
                        reader["assTotalpoint"].ToString(),
                        reader["uID"].ToString(),
                        reader["uIDLD"].ToString(),
                        reader["uIDLD_1"].ToString(),
                        reader["Nhanvien"].ToString(),
                        reader["Lanhdao"].ToString());
                        list.Add(objtbAssessmentDATA);
                    }
                }
                dbConn.Close();
            }
        }
        return list;
    }
    #endregion
    #region[tbAssessment_GetByuID_Asc]
    public static List<tbAssessmentDATA> tbAssessment_GetByuID_Asc(string uID)
    {
        List<tbAssessmentDATA> list = new List<tbAssessmentDATA>();
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_GetByuID_Asc", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbConn.Open();
                dbCmd.Parameters.Add(new SqlParameter("@uID", uID));
                using (SqlDataReader reader = dbCmd.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        tbAssessmentDATA objtbAssessmentDATA = new tbAssessmentDATA(
                        reader["assId"].ToString(),
                        reader["assDateBegin"].ToString(),
                        reader["assDateEnd"].ToString(),
                        reader["assDate"].ToString(),
                        reader["assPoint"].ToString(),
                        reader["assPointLD"].ToString(),
                        reader["assPointLD_1"].ToString(),
                        reader["assTotalpoint"].ToString(),
                        reader["uID"].ToString(),
                        reader["uIDLD"].ToString(),
                        reader["uIDLD_1"].ToString(),
                        reader["Nhanvien"].ToString(),
                        reader["Lanhdao"].ToString());
                        list.Add(objtbAssessmentDATA);
                    }
                }
                dbConn.Close();
            }
        }
        return list;
    }
    #endregion
    #region[tbAssessment_GetByuIDLD_Asc]
    public static List<tbAssessmentDATA> tbAssessment_GetByuIDLD_Asc(string uIDLD)
    {
        List<tbAssessmentDATA> list = new List<tbAssessmentDATA>();
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_GetByuIDLD_Asc", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbConn.Open();
                dbCmd.Parameters.Add(new SqlParameter("@uIDLD", uIDLD));
                using (SqlDataReader reader = dbCmd.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        tbAssessmentDATA objtbAssessmentDATA = new tbAssessmentDATA(
                        reader["assId"].ToString(),
                        reader["assDateBegin"].ToString(),
                        reader["assDateEnd"].ToString(),
                        reader["assDate"].ToString(),
                        reader["assPoint"].ToString(),
                        reader["assPointLD"].ToString(),
                        reader["assPointLD_1"].ToString(),
                        reader["assTotalpoint"].ToString(),
                        reader["uID"].ToString(),
                        reader["uIDLD"].ToString(),
                        reader["uIDLD_1"].ToString(),
                        reader["Nhanvien"].ToString(),
                        reader["Lanhdao"].ToString());
                        list.Add(objtbAssessmentDATA);
                    }
                }
                dbConn.Close();
            }
        }
        return list;
    }
    #endregion
    #region[tbAssessment_GetByCN_Asc]
    public static List<tbAssessmentDATA> tbAssessment_GetByCN_Asc(string uIDLD)
    {
        List<tbAssessmentDATA> list = new List<tbAssessmentDATA>();
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_GetByCN_Asc", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbConn.Open();
                dbCmd.Parameters.Add(new SqlParameter("@uIDLD", uIDLD));
                using (SqlDataReader reader = dbCmd.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        tbAssessmentDATA objtbAssessmentDATA = new tbAssessmentDATA(
                        reader["assId"].ToString(),
                        reader["assDateBegin"].ToString(),
                        reader["assDateEnd"].ToString(),
                        reader["assDate"].ToString(),
                        reader["assPoint"].ToString(),
                        reader["assPointLD"].ToString(),
                        reader["assPointLD_1"].ToString(),
                        reader["assTotalpoint"].ToString(),
                        reader["uID"].ToString(),
                        reader["uIDLD"].ToString(),
                        reader["uIDLD_1"].ToString(),
                        reader["Nhanvien"].ToString(),
                        reader["Lanhdao"].ToString());
                        list.Add(objtbAssessmentDATA);
                    }
                }
                dbConn.Close();
            }
        }
        return list;
    }
    #endregion
    #region[tbAssessment_GetByAdmin_Asc]
    public static List<tbAssessmentDATA> tbAssessment_GetByAdmin_Asc()
    {
        List<tbAssessmentDATA> list = new List<tbAssessmentDATA>();
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_GetByAdmin_Asc", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbConn.Open();
                using (SqlDataReader reader = dbCmd.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        tbAssessmentDATA objtbAssessmentDATA = new tbAssessmentDATA(
                        reader["assId"].ToString(),
                        reader["assDateBegin"].ToString(),
                        reader["assDateEnd"].ToString(),
                        reader["assDate"].ToString(),
                        reader["assPoint"].ToString(),
                        reader["assPointLD"].ToString(),
                        reader["assPointLD_1"].ToString(),
                        reader["assTotalpoint"].ToString(),
                        reader["uID"].ToString(),
                        reader["uIDLD"].ToString(),
                        reader["uIDLD_1"].ToString(),
                        reader["Nhanvien"].ToString(),
                        reader["Lanhdao"].ToString());
                        list.Add(objtbAssessmentDATA);
                    }
                }
                dbConn.Close();
            }
        }
        return list;
    }
    #endregion
    #region[tbAssessment_GetByAdmin_Asc_CN]
    public static List<tbAssessmentDATA> tbAssessment_GetByAdmin_Asc_CN()
    {
        List<tbAssessmentDATA> list = new List<tbAssessmentDATA>();
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_GetByAdmin_Asc_CN", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbConn.Open();
                using (SqlDataReader reader = dbCmd.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        tbAssessmentDATA objtbAssessmentDATA = new tbAssessmentDATA(
                        reader["assId"].ToString(),
                        reader["assDateBegin"].ToString(),
                        reader["assDateEnd"].ToString(),
                        reader["assDate"].ToString(),
                        reader["assPoint"].ToString(),
                        reader["assPointLD"].ToString(),
                        reader["assPointLD_1"].ToString(),
                        reader["assTotalpoint"].ToString(),
                        reader["uID"].ToString(),
                        reader["uIDLD"].ToString(),
                        reader["uIDLD_1"].ToString(),
                        reader["Nhanvien"].ToString(),
                        reader["Lanhdao"].ToString());
                        list.Add(objtbAssessmentDATA);
                    }
                }
                dbConn.Close();
            }
        }
        return list;
    }
    #endregion
    #region[tbAssessment_GetByassTotalpoint_Asc]
    public static List<tbAssessmentDATA> tbAssessment_GetByassTotalpoint_Asc()
    {
        List<tbAssessmentDATA> list = new List<tbAssessmentDATA>();
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_GetByassTotalpoint_Asc", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbConn.Open();
                using (SqlDataReader reader = dbCmd.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        tbAssessmentDATA objtbAssessmentDATA = new tbAssessmentDATA(
                        reader["assId"].ToString(),
                        reader["assDateBegin"].ToString(),
                        reader["assDateEnd"].ToString(),
                        reader["assDate"].ToString(),
                        reader["assPoint"].ToString(),
                        reader["assPointLD"].ToString(),
                        reader["assPointLD_1"].ToString(),
                        reader["assTotalpoint"].ToString(),
                        reader["uID"].ToString(),
                        reader["uIDLD"].ToString(),
                        reader["uIDLD_1"].ToString(),
                        reader["Nhanvien"].ToString(),
                        reader["Lanhdao"].ToString());
                        list.Add(objtbAssessmentDATA);
                    }
                }
                dbConn.Close();
            }
        }
        return list;
    }
    #endregion
    #region[tbAssessment_GetByassTotalpoint_Desc]
    public static List<tbAssessmentDATA> tbAssessment_GetByassTotalpoint_Desc()
    {
        List<tbAssessmentDATA> list = new List<tbAssessmentDATA>();
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_GetByassTotalpoint_Desc", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbConn.Open();
                using (SqlDataReader reader = dbCmd.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        tbAssessmentDATA objtbAssessmentDATA = new tbAssessmentDATA(
                        reader["assId"].ToString(),
                        reader["assDateBegin"].ToString(),
                        reader["assDateEnd"].ToString(),
                        reader["assDate"].ToString(),
                        reader["assPoint"].ToString(),
                        reader["assPointLD"].ToString(),
                        reader["assPointLD_1"].ToString(),
                        reader["assTotalpoint"].ToString(),
                        reader["uID"].ToString(),
                        reader["uIDLD"].ToString(),
                        reader["uIDLD_1"].ToString(),
                        reader["Nhanvien"].ToString(),
                        reader["Lanhdao"].ToString());
                        list.Add(objtbAssessmentDATA);
                    }
                }
                dbConn.Close();
            }
        }
        return list;
    }
    #endregion
    #region[tbAssessment_GetByuIDLD_assTotalpoint_Asc]
    public static List<tbAssessmentDATA> tbAssessment_GetByuIDLD_assTotalpoint_Asc(string uIDLD)
    {
        List<tbAssessmentDATA> list = new List<tbAssessmentDATA>();
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_GetByuIDLD_assTotalpoint_Asc", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbConn.Open();
                dbCmd.Parameters.Add(new SqlParameter("@uIDLD", uIDLD));
                using (SqlDataReader reader = dbCmd.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        tbAssessmentDATA objtbAssessmentDATA = new tbAssessmentDATA(
                        reader["assId"].ToString(),
                        reader["assDateBegin"].ToString(),
                        reader["assDateEnd"].ToString(),
                        reader["assDate"].ToString(),
                        reader["assPoint"].ToString(),
                        reader["assPointLD"].ToString(),
                        reader["assPointLD_1"].ToString(),
                        reader["assTotalpoint"].ToString(),
                        reader["uID"].ToString(),
                        reader["uIDLD"].ToString(),
                        reader["uIDLD_1"].ToString(),
                        reader["Nhanvien"].ToString(),
                        reader["Lanhdao"].ToString());
                        list.Add(objtbAssessmentDATA);
                    }
                }
                dbConn.Close();
            }
        }
        return list;
    }
    #endregion
    #region[tbAssessment_GetByuIDLD_assTotalpoint_Desc]
    public static List<tbAssessmentDATA> tbAssessment_GetByuIDLD_assTotalpoint_Desc(string uIDLD)
    {
        List<tbAssessmentDATA> list = new List<tbAssessmentDATA>();
        using (SqlConnection dbConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_tbAssessment_GetByuIDLD_assTotalpoint_Desc", dbConn))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbConn.Open();
                dbCmd.Parameters.Add(new SqlParameter("@uIDLD", uIDLD));
                using (SqlDataReader reader = dbCmd.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        tbAssessmentDATA objtbAssessmentDATA = new tbAssessmentDATA(
                        reader["assId"].ToString(),
                        reader["assDateBegin"].ToString(),
                        reader["assDateEnd"].ToString(),
                        reader["assDate"].ToString(),
                        reader["assPoint"].ToString(),
                        reader["assPointLD"].ToString(),
                        reader["assPointLD_1"].ToString(),
                        reader["assTotalpoint"].ToString(),
                        reader["uID"].ToString(),
                        reader["uIDLD"].ToString(),
                        reader["uIDLD_1"].ToString(),
                        reader["Nhanvien"].ToString(),
                        reader["Lanhdao"].ToString());
                        list.Add(objtbAssessmentDATA);
                    }
                }
                dbConn.Close();
            }
        }
        return list;
    }
    #endregion
}
